import $api from './index';

interface QuestionData {
  companyId: string;
  title: string;
  uid: string;
  content: string;
  tags?: string;
}
export default null;
export const addQuestion = async (data: QuestionData) => {
  const res = await $api.post('/question', data);
  return res;
};

export const getQuestList = async ({ $limit = 10, $skip = 0, title = '' }) => {
  const queryTitle = title ? `&title=${title}` : '';
  const res = await $api.get(`/question?$limit=${$limit}&$skip=${$skip}${queryTitle}`);
  return res;
};
